#include <iostream>
int main()
{
    using namespace std;
    int a;
    cin >> a;
    if (a < 1000 || a % 2 == 0 )
    cout << 0;
    else {
        cout << a;
    }

    return 0;
}
